<html>
<head>
<title>time</title>
<body bgcolor=#ffffff>
<h2 align=center>time</h2>
<h4 align=center>OS/161 Reference Manual</h4>

<h3>Name</h3>
time - get time of day

<h3>Library</h3>
Standard C Library (libc, -lc)

<h3>Synopsis</h3>
#include &lt;time.h&gt;<br>
<br>
time_t<br>
time(time_t *<em>ptr</em>);

<h3>Description</h3>

The current time (in seconds since midnight GMT on January 1, 1970) is
retrieved. If <em>ptr</em> is non-null, the time is stored through
<em>ptr</em>. The time is also returned.
<p>

time is a wrapper around the system call
<A HREF=../syscall/__time.html>__time</A>, which returns nanoseconds
as well as seconds.

<h3>Return Values</h3>

time returns the time. On error, -1 is returned, and errno is set to
indicate the error.

<h3>Errors</h3>

The following error is the only way time should be capable of failing.

<blockquote><table width=90%>
<td width=10%>&nbsp;</td><td>&nbsp;</td></tr>
<tr><td>EFAULT</td>	<td><em>ptr</em> was an invalid non-NULL
			address.</td></tr>
</table></blockquote>

</body>
</html>
